﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Ruction
{
    /// <summary>Provides basic logic for property centric objects.</summary>
    public abstract class BaseObject : INotifyPropertyChanged
    {
        #region Events

        #region PropertyChanged
        /// <summary>Raised when a property on this instance changes.</summary>
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion PropertyChanged

        #endregion Events

        #region Methods

        #region OnPropertyChanged
        /// <summary>Raises the PropertyChanged event.</summary>
        /// <param name="name">The name of the property for which the value has changed.</param>
        protected void OnPropertyChanged(string name)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(name));
        }
        #endregion OnPropertyChanged

        #endregion Methods
    }
}